package com.cizzy.api;

import com.cizzy.api.filter.AuthGatewayFilterFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;

/**
 * @author cb
 */
@SpringBootApplication
@EnableDiscoveryClient
@ComponentScan("com.cizzy.api.filter")
public class ApiGatewayApplication {
    public static void main(String[] args) {
        SpringApplication.run(ApiGatewayApplication.class, args);
    }

    @Bean
    public AuthGatewayFilterFactory addAuthGatewayFilterFactory() {
        return new AuthGatewayFilterFactory();
    }
}
